function move(ele, styleObj, fn) {
    let timerObj = {};
    for (let attr in styleObj) {
      let curStyle;
      if (attr == 'opacity') {
        curStyle = getStyle(ele, attr) * 100;
        styleObj[attr] = styleObj[attr] * 100;
      } else {
        curStyle = parseInt(getStyle(ele, attr));
      }
      timerObj[attr] = setInterval(() => {
        let goLength = (styleObj[attr] - curStyle) / 10;
        if (goLength > 0) {
          goLength = Math.ceil(goLength);
        } else {
          goLength = Math.floor(goLength);
        }
        curStyle += goLength;
        if (curStyle == styleObj[attr]) {
          clearInterval(timerObj[attr]);
          delete timerObj[attr];
          let k = 0; 
          for (let key in timerObj) {
            k++;
          }
          if (k == 0) {fn();}
        } else {
          if (attr == 'opacity') {
            ele.style[attr] = curStyle / 100;
          } else {
            ele.style[attr] = curStyle + 'px';
          }
        }
      }, 30);
    }
  }
  // 获取元素的样式函数
  function getStyle(ele, style) {
    try {
      return window.getComputedStyle(ele)[style];
    } catch (error) {
      return ele.currentStyle[style];
    }
  }
  // 设置元素样式函数
  function setStyle(ele,styleObj){
    for (const attr in styleObj) {
      ele.style[attr] = styleObj[attr];
    }
  }
  // 获取随机数函数
  function getNum(a,b){
    return Math.floor(Math.random()*(b-a+1)+a);
  }
  // 获取随机颜色
  function getColor(){
    return `rgb(${getNum(0,255)},${getNum(0,255)},${getNum(0,255)})`
  }
  